import React from "react";
import { useParams, useLocation, useNavigate } from 'react-router-dom'
function withRouter(Component) {
    return (props) => (
        <Component
            {...props}
            params={useParams()}
            location={useLocation()}
            navigate={useNavigate()}
        />
    );
}
class List extends React.Component{
    constructor(){
        super()
    }
    render(){
        console.log(this.props.location.pathname);
        const params = new URLSearchParams(this.props.location.pathname)
        console.log(params);
        return <div>商品详情</div>
    }
}
export default withRouter(List)